public class Test {

    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(3);
        myLinkedList.addFirst(4);
        myLinkedList.addFirst(4);
        myLinkedList.addFirst(4);
        myLinkedList.addFirst(4);

        myLinkedList.addIndex(2,-2);

        myLinkedList.removeAll(4);

        System.out.println(myLinkedList.size());
        myLinkedList.display();
        System.out.println(myLinkedList.contains(3));



    }

    public static void main1(String[] args) {
        MySingleList mySingleList =new MySingleList();
        //mySingleList.createList();


        mySingleList.addLast(1);
        mySingleList.addLast(2);
        mySingleList.addLast(3);
        mySingleList.addLast(4);
        mySingleList.addLast(5);
//        mySingleList.addFirst(1);
//        mySingleList.addFirst(2);
//        mySingleList.addFirst(3);
//        mySingleList.addFirst(4);
//        mySingleList.addFirst(5);

        System.out.println(mySingleList.size());
        System.out.println(mySingleList.contains(12));

        mySingleList.show();
        mySingleList.reverseList();
        mySingleList.show();
        MySingleList.ListNode ret = mySingleList.reverseList();
        mySingleList.show(ret);

        try {
            mySingleList.addInsert(30,-1);
        }catch(IndexOutOfBounds indexOutOFBounds) {
            indexOutOFBounds.printStackTrace();
        }

       // mySingleList.clear();
        mySingleList.show();
    }
}
